import { describe, it, expect } from 'vitest';
import { compilerOptionsKeys, configKeys, CompilerOptionAirMode } from '../index'

describe('type-config index', () => {
  it('should export correct keys and types', () => {
    expect(compilerOptionsKeys).toBeDefined();
    expect(configKeys).toBeDefined();
    expect(CompilerOptionAirMode).toBeDefined();
  });
  it('should have correct CompilerOptionAirMode', () => {
    expect(CompilerOptionAirMode).toMatchInlineSnapshot(`
      {
        "0": "AIR_MODE_OFF",
        "1": "AIR_MODE_TTML_WITHOUT_JS",
        "2": "AIR_MODE_NATIVE_SCRIPT",
        "3": "AIR_MODE_STRICT",
        "4": "AIR_MODE_FIBER",
        "AIR_MODE_FIBER": 4,
        "AIR_MODE_NATIVE_SCRIPT": 2,
        "AIR_MODE_OFF": 0,
        "AIR_MODE_STRICT": 3,
        "AIR_MODE_TTML_WITHOUT_JS": 1,
      }
    `)
  });
  it('should have correct compilerOptionsKeys', () => {
    expect(compilerOptionsKeys.length).toBe(38);
    expect(compilerOptionsKeys).toMatchInlineSnapshot(`
      [
        "bundleModuleMode",
        "debugInfoOutside",
        "defaultDisplayLinear",
        "defaultOverflowVisible",
        "disableMultipleCascadeCSS",
        "enableAirRawCSS",
        "enableComponentConfig",
        "enableCSSAsyncDecode",
        "enableCSSClassMerge",
        "enableCSSEngine",
        "enableCssExternalClass",
        "enableCSSInvalidation",
        "enableCSSLazyDecode",
        "enableCSSSelector",
        "enableCSSStrictMode",
        "enableCSSVariable",
        "enableDynamicComponent",
        "enableEventRefactor",
        "enableFiberArch",
        "enableFlexibleTemplate",
        "enableKeepPageData",
        "enableLepusChunkAsyncDecode",
        "enableLepusDebug",
        "enableLynxAir",
        "enableParallelElement",
        "enableRadon",
        "enableRemoveCSSScope",
        "enableReuseContext",
        "enableSimpleStyling",
        "experimental_encodeQuickjsBytecode",
        "forceCalcNewStyle",
        "implicitAnimation",
        "lynxAirMode",
        "removeCSSParserLog",
        "targetSdkVersion",
        "templateDebugUrl",
        "trialOptions",
        "useLepusNG",
      ]
    `)
  })
  it('should have correct configKeys', () => {
    expect(configKeys.length).toBe(130);
    expect(configKeys).toMatchInlineSnapshot(`
      [
        "absoluteInContentBound",
        "asyncRedirect",
        "autoExpose",
        "CSSAlignWithLegacyW3C",
        "customCSSInheritanceList",
        "dataStrictMode",
        "disableLongpressAfterScroll",
        "disableQuickTracingGC",
        "enableA11y",
        "enableAccessibilityElement",
        "enableAirDetectRemovedKeysWhenUpdateData",
        "enableAsyncInitVideoEngine",
        "enableAsyncRequestImage",
        "enableAsyncResolveSubtree",
        "enableCheckExposureOptimize",
        "enableCheckLocalImage",
        "enableCircularDataCheck",
        "enableComponentAsyncDecode",
        "enableComponentLifecycleAlignWebview",
        "enableComponentNullProp",
        "enableCreateViewAsync",
        "enableCSSInheritance",
        "enableCSSInlineVariables",
        "enableCSSLazyImport",
        "enableCSSStrictMode",
        "enableDisexposureWhenLynxHidden",
        "enableEndGestureAtLastFingerUp",
        "enableEventHandleRefactor",
        "enableEventThrough",
        "enableExposureUIMargin",
        "enableExposureWhenLayout",
        "enableExposureWhenReload",
        "enableFiberElementForRadonDiff",
        "enableFixedNew",
        "enableHarmonyNewOverlay",
        "enableHarmonyVisibleAreaChangeForExposure",
        "enableICU",
        "enableImageDownsampling",
        "enableJsBindingApiThrowException",
        "enableJSDataProcessor",
        "enableListMoveOperation",
        "enableListNewArchitecture",
        "enableListPlug",
        "enableLynxScrollFluency",
        "enableMicrotaskPromisePolyfill",
        "enableMTSPreExecute",
        "enableMultiTouch",
        "enableMultiTouchParamsCompatible",
        "enableNativeList",
        "enableNewAnimator",
        "enableNewClipMode",
        "enableNewGesture",
        "enableNewImage",
        "enableNewIntersectionObserver",
        "enableNewListContainer",
        "enableNewTransformOrigin",
        "enablePlatformGesture",
        "enablePropertyBasedSimpleStyle",
        "enableQueryComponentSync",
        "enableReactOnlyPropsId",
        "enableReduceInitDataCopy",
        "enableReloadLifecycle",
        "enableRemoveComponentExtraData",
        "enableReuseLoadScriptExports",
        "enableSignalAPI",
        "enableSimultaneousTap",
        "enableTextBoringLayout",
        "enableTextGradientOpt",
        "enableTextLanguageAlignment",
        "enableTextLayerRender",
        "enableTextLayoutCache",
        "enableTextNonContiguousLayout",
        "enableTextOverflow",
        "enableTextRefactor",
        "enableTouchRefactor",
        "enableUIOperationOptimize",
        "enableUnifiedPipeline",
        "enableUseContextPool",
        "enableUseMapBuffer",
        "enableViewReceiveTouch",
        "enableVsyncAlignedFlush",
        "enableXTextLayoutReused",
        "extendedLayoutOnlyOpt",
        "extraInfo",
        "flatten",
        "fontScaleEffectiveOnlyOnSp",
        "implicit",
        "includeFontPadding",
        "keyboardCallbackPassRelativeHeight",
        "lepusGCThreshold",
        "lepusNullPropAsUndef",
        "lepusQuickjsStacksize",
        "lepusStrict",
        "longPressDuration",
        "mapContainerType",
        "observerFrameRate",
        "pipelineSchedulerConfig",
        "preferredFps",
        "quirksMode",
        "removeDescendantSelectorScope",
        "strictPropType",
        "tapSlop",
        "trailNewImage",
        "unifyVWVHBehavior",
        "useImagePostProcessor",
        "useNewSwiper",
        "autoResumeAnimation",
        "cli",
        "compileRender",
        "customData",
        "enableA11yIDMutationObserver",
        "enableAsyncDisplay",
        "enableBackgroundShapeLayer",
        "enableCascadePseudo",
        "enableCheckDataWhenUpdatePage",
        "enableComponentLayoutOnly",
        "enableGlobalComponentMap",
        "enableNativeScheduleCreateViewAsync",
        "enableNewAccessibility",
        "enableNewLayoutOnly",
        "enableOptPushStyleToBundle",
        "enableOverlapForAccessibilityElement",
        "fixCSSImportRuleOrder",
        "forceCalcNewStyle",
        "reactVersion",
        "redBoxImageSizeWarningThreshold",
        "removeComponentElement",
        "syncImageAttach",
        "useNewImage",
        "version",
      ]
    `);
  });
});
